package com.usian.user.controller;

import com.usian.apis.user.ApUserRealnameControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.AuthDto;
import com.usian.user.service.ApUserRealnameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2023/8/24 14:01
 */
@RestController
@RequestMapping("/apUserRealname")
public class ApUserRealnameController implements ApUserRealnameControllerApi {

    @Autowired
    ApUserRealnameService apUserRealnameService;

    @Override
    @PostMapping("/findUserRealNameList")
    public ResponseResult findUserRealNameList(@RequestBody AuthDto authDto) {
        return apUserRealnameService.findUserRealNameList(authDto);
    }

    @Override
    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto authDto) {
        return apUserRealnameService.updateStatusById(authDto);
    }

    @Override
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto authDto) {
        return apUserRealnameService.updateStatusById(authDto);
    }
}
